#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class RoomInfo : Business.BusinessBase<RoomInfo, int>
	{
		#region Fields and Properties

		private String roomState = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String RoomState
		{
			get { return roomState; }
			set
			{
				if (value != roomState)
				{
					MarkChanged("RoomState");
					roomState = value;
				}
			}
		}

		private int availNum = 0;
		/// <summary>
		/// 
		/// </summary>
		public int AvailNum
		{
			get { return availNum; }
			set
			{
				if (value != availNum)
				{
					MarkChanged("AvailNum");
					availNum = value;
				}
			}
		}

		private int existNum = 0;
		/// <summary>
		/// 
		/// </summary>
		public int ExistNum
		{
			get { return existNum; }
			set
			{
				if (value != existNum)
				{
					MarkChanged("ExistNum");
					existNum = value;
				}
			}
		}

		private int totalNum = 0;
		/// <summary>
		/// 
		/// </summary>
		public int TotalNum
		{
			get { return totalNum; }
			set
			{
				if (value != totalNum)
				{
					MarkChanged("TotalNum");
					totalNum = value;
				}
			}
		}

		private String roomNum = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String RoomNum
		{
			get { return roomNum; }
			set
			{
				if (value != roomNum)
				{
					MarkChanged("RoomNum");
					roomNum = value;
				}
			}
		}

		private String buildingCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String BuildingCode
		{
			get { return buildingCode; }
			set
			{
				if (value != buildingCode)
				{
					MarkChanged("BuildingCode");
					buildingCode = value;
				}
			}
		}

		private String roomCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String RoomCode
		{
			get { return roomCode; }
			set
			{
				if (value != roomCode)
				{
					MarkChanged("RoomCode");
					roomCode = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public RoomInfo()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override RoomInfo DataSelect(int id)
		{
			return Services.DALService.RoomInfoService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.RoomInfoService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.RoomInfoService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.RoomInfoService.Delete(this);
		}

		#endregion Base overrides
	}
}
